<?php
require_once (dirname(__FILE__) .'/PtObjectAbstract.php');
class PtCMS extends PtObjectAbstract
{
	public $id;
	public $code;
	public $version;
	public $url ;
	public $name;
	public $description;
	public $active;
	
	/**
	 * @see ObjectAbstract::$definition
	 */
	public static $definition = array(
		'table'   => 'cms',
		'primary' => 'id_cms',
		'fields'  => array(
			'code'        => array('type' => self::TYPE_STRING, 'validate' => 'isTplName', 'required' => true, 'size' => 32),
			'version'     => array('type' => self::TYPE_STRING, 'validate' => 'isVersion', 'required' => true, 'size' => 16),
			'url'         => array('type' => self::TYPE_STRING, 'validate' => 'isUrl', 'required' => true, 'size' => 16),
			'name'        => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'lang' => true, 'size' => 128),
			'description' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'lang' => true),
			'active'      => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
		)
	);
}